home *** CD-ROM | disk | FTP | other *** search
- #pragma implementation
- #include "diadef.h"
- #include "dialog.h"
- /*
- Update all variables with the edition buffer.
- */
- PUBLIC void DIALOG::save()
- {
- for (int i=0; i<getnb(); i++){
- FIELD *fi = getitem(i);
- if (!fi->is_readonly()) fi->save();
- }
- rstmodified();
- }
- /*
- Set all variables to its original content.
- */
- PUBLIC void DIALOG::restore()
- {
- for (int i=0; i<getnb(); i++){
- FIELD *fi = getitem(i);
- if (!fi->is_readonly()) fi->restore();
- }
- }
- /*
- Return != 0 if anyone field has been modified
- */
- PUBLIC int DIALOG::was_modified()
- {
- modified = 0;
- return ARRAY::was_modified();
- }
-
- PUBLIC FIELD *DIALOG::getitem(int no)
- {
- return (FIELD*)ARRAY::getitem(no);
- }
-
- void dialog_clear()
- {
- if (dialog_mode != DIALOG_HTML){
- init_dialog();
- attr_clear(stdscr, LINES, COLS, screen_attr);
- }
- }
-
- PUBLIC FIELD_MSG::FIELD_MSG()
- {
- is_loaded = 0;
- }
-
-
- /*
- Record the icon name (no extension) which describe this dialog.
- This will often be a translatable name (uh ?) allowing different icons
- for different culture/language/society
- */
- PUBLIC void DIALOG::seticon (const char *_icon)
- {
- icon.setfrom (_icon);
- }
-
-